﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.BLL;
public partial class Supervise_ChartIndex : System.Web.UI.Page
{

    private void Page_Load(object sender, System.EventArgs e)
    {

        Graph graph = new Graph();
        DateTime _dateEndDate = Convert.ToDateTime("2007-3-23");
        _dateEndDate = MonthStart(_dateEndDate);
        GraphDataSet.GraphTableDataTable GraphTable = new GraphDataSet.GraphTableDataTable();
        GraphTable = graph.GetGraphByWhere("70", "GoodsId", 45, "1", 530000, _dateEndDate,"0");
        GraphControl1.GraphTable = GraphTable;
        GridView1.DataSource = GraphTable.DefaultView;
        GridView1.DataBind();

        
    }
    public DateTime MonthStart(DateTime date)
    {
        DateTime dateTemp = date;
        try
        {
            int _intYear = date.Year;
            int _intMonth = date.Month;
            string _strTemp = _intYear.ToString() + "-" + _intMonth.ToString() + "-01";
            dateTemp = Convert.ToDateTime(_strTemp);
        }
        catch (Exception me)
        {
            throw me;
        }
        return dateTemp;
    }

}
